<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>
<title>Lista de lojas</title>
<h:body>
	<f:view>
		<h:form>
			<center>
				<p:panel>
					<p:panelGrid columns="3">
						<p:commandLink value="Inicio" action="menu.xhtml" />
						<p:commandLink value="Nova Medida "
							action="cadastro-de-medidas.xhtml" />
						<p:commandLink value="Relatórios" action="lista-de-medidas.xhtml" />
					</p:panelGrid>
				</p:panel>
				<p:dataTable value="#{unidadeDeMedidaBean.medidas}" var="medida"
					border="1" emptyMessage="Não ha registros"
					filterBay="#{unidadeDeMedidaBean.medidas}" id="tabela">
					<p:column>
						<f:facet name="header">
			   	   Codigo
			        </f:facet>
						<h:outputText value="#{medida.id}" />
					</p:column>
					<p:column>
						<f:facet name="header">
			   	    Nome:
			        </f:facet>
						<h:outputText value="#{medida.nome}" />
					</p:column>
					<p:column>
						<f:facet name="header">
			   	   Ações
			        </f:facet>
						<p:commandButton value="Remover" id="remove"
							actionListener="#{unidadeDeMedidaBean.removerMedida}">
							<f:param name="idMedida" value="#{medida.id}" />
						</p:commandButton>
					</p:column>
				</p:dataTable>
			</center>
		</h:form>
	</f:view>
</h:body>
</html>
